/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: SmsMessage
 * Author:   sjkyll
 * Date:     2018-07-26 12:28
 * Description: 短信实体
 * <author>          <time>          <version>          <desc>
 * 作者姓名         修改时间           版本号            描述
 */
package com.cdqidi.smsservice.dto;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br>
 *
 * @author sjkyll
 * @create 2018-07-26 12:28
 * @since 1.0.0
 */
@Getter
@Setter
public class SmsMessage {
    @NotNull(message = "学校id不能为空")
    private String schoolid;
    private String userid;
    @NotNull(message = "手机号不能为空")
    private String mobile;
    @NotNull(message = "短信内容不能为空")
    private String content;
    private Date sendtime;
    @NotNull(message = "smid不能为空")
    private String smid;
    @NotNull(message = "业务系统编号不能为空")
    private String busscode;
    private Integer smlevel;
    @NotNull(message = "网关编号不能为空")
    private Integer channelid;
    @Min(value = 0, message = "isLong输入值异常")
    private Integer isLong;
    @NotNull(message = "扩展码不能为空")
    private String extCode;
    @NotNull(message = "用户类型不能为空")
    private String userType;
    @Size(max = 20, message = "签名长度不能超过{max}位")
    private String sign;

    public void freeData() {
        this.schoolid = null;
        this.userid = null;
        this.mobile = null;
        this.content = null;
        this.sendtime = null;
        this.smid = null;
        this.busscode = null;
        this.smlevel = null;
        this.channelid = null;
        this.isLong = null;
        this.extCode = null;
        this.userType = null;
        this.sign = null;
    }
}